package com.pet.dao.wys.impl;

import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

import com.ibatis.sqlmap.client.SqlMapClient;
import com.pet.bean.ForumBean;
import com.pet.bean.ReplyBean;
import com.pet.dao.wys.ForumDao;

/**
 * 类名称 ： ForumBeanImpl
 * 类描述 ：
 * 创建人 ： wangys
 * 分机号 ： 6721
 * 创建时间 ： 2013-3-24下午05:52:31
 *
 */
public class ForumDaoImpl implements ForumDao {
	private SqlMapClient dbClient;
	
	@Override
	public ForumBean queryForumById(ForumBean forumBean) {
		ForumBean fb;
		try {
			fb = (ForumBean) dbClient.queryForObject("queryForumById", forumBean);
		} catch (SQLException e) {
			e.printStackTrace();
			fb = null;
		}
		return fb;
	}
	@SuppressWarnings("unchecked")
	@Override
	public List queryReplyBean(ForumBean forumBean) {
		List lr = new ArrayList();
		try {
			lr = dbClient.queryForList("queryReplyBean", forumBean);
		} catch (SQLException e) {
			e.printStackTrace();
			lr = null;
		}
		return lr;
	}
	
	public SqlMapClient getDbClient() {
		return dbClient;
	}
	public void setDbClient(SqlMapClient dbClient) {
		this.dbClient = dbClient;
	}
}
